// imagerecord.ts 主要查询用户AI生成内容查询,
import request from '@/js/utils/request'; // 假设你之前的 request.ts 文件放在 utils 目录


//获取当前用户生图记录
export const getTextToImageRecord = (data : { clientId : string }) => {
	return request.get<TextToImageRecord>('/image/record', data);
};



export interface TextToImageRecord {
    pageNum: number;
    pageSize: number;
    totalPage: number;
    total: number;
    list: TextToImageRecordItem[];
}

export interface TextToImageRecordItem {
    id: number;
    uuid: string;
    clientId: string;
    prompt: string;
    type: string;
    note: string; // 可以解析成一个对象，如果需要
    createTime: string;
    status: string;
    images: ImageRecordFileData[];
}

export interface ImageRecordFileData {
    fileId: string;
    fileSize: number;
    name: string;
    fileExtension: string;
    url: string;
    createBy: number;
    parentFileId: string;
}